<div class="col-sm-12">
<div class="panel panel-default">
    <div class="panel-body">
        <div class="form-group">
            <div class="col-xs-6">
				<div class="col-sm-6">
						<!--<select class="form-control" ng-model="obj" ng-options="obj.code as obj.name for obj in objs" ng-change="tktmachine(obj)">
	            </select>-->
						<ui-select ng-model="searchform.place_code" theme="bootstrap">
							<ui-select-match placeholder="请选择一个景区">
								{{$select.selected.name}}
                  <!--<option value=""> --全部-- </option>	-->
							</ui-select-match>
							<ui-select-choices repeat="item.code as item in viewarr | filter: $select.search">
								<span ng-bind-html="item.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
                <!--<label>景区</label>&nbsp;&nbsp;-->
                <!--<select class="form-control" ng-model="searchform.place_code" 
                  ng-options="view.code as view.name for view in viewarr"
                >
                </select>-->
            </div>
			<div class="col-xs-3 text-right">
                <button type="button" class="btn btn-default search" ng-click="load()">立即搜索</button>

			</div>
            <div class="col-xs-2 text-right">
                <button type="button" class="btn btn-info new" ng-click="create()">发布新票种</button>
            </div>
        </div>
    </div>
</div><!-- searchArea -->

<div class="panel panel-info" ng-repeat="tkttype in objs track by $index" >
  <!-- Default panel contents -->
  <div class="panel-heading">{{tkttype.viewname}}</div>

  <table class="table table-bordered">
    <thead>
      <tr>
        <th class="col-md-3 text-center">票种名称</th>
        <th class="col-md-1 text-center">票种编号</th>
        <th class="col-md-1 text-center">允许消票</th>
        <th class="col-md-1 text-center">票种状态</th>
        <th class="col-md-2 text-center">预定详情</th>
        <th class="col-md-3 text-center">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="obj in tkttype.ticketarr">
        <td class="">{{obj.name}}</td>
        <td class="text-center">{{obj.code}}</td>
        <td class="text-center">{{obj.used_state}}</td>
        <td class="text-center">{{obj.state}}</td>
        <td class="text-center">{{obj.book_info}}</td>
        <td class="text-center">
		      <a ng-show="obj.state=='1'" ng-click="start(obj.id)" class="btn btn-primary btn-xs">下架</a>
          <a ng-show="obj.state=='0'" ng-click="stop(obj.id)" class="btn btn-primary btn-xs">上架</a>
          <a ng-click="edit(obj.id, obj.place_code)" class="btn btn-success btn-xs">编辑</a>
          <a ng-show="obj.used_state=='1'" ng-click="usedstart(obj.id)" class="btn btn-primary btn-xs">允许消票</a>
          <a ng-show="obj.used_state=='0'" ng-click="usedstop(obj.id)" class="btn btn-danger btn-xs">禁止消票</a>
          <!--<a ng-click="auth(obj.code)" class="btn btn-warning btn-xs">消票权限</a>-->
          <!-- <a ng-click="updateTicket(obj.code)" class="btn btn-warning btn-xs">更新票有效期</a> -->
        </td>
      </tr>
    </tbody>
  </table>
  
</div>
</div>